1. Field of the Invention
The present invention relates to an image processing apparatus that interpolates a defective pixel of an image pickup element to perform an image processing.
2. Description of the Related Art
There is an image processing apparatus that arranges a plurality of photo diodes for one micro lens of an image pickup element to perform a pupil division and that calculates a defocus amount based on a phase difference to perform focus detection. Japanese Patent Laid-Open No. 2001-083407 discloses a technology that calculates a defocus amount and a defocus direction based on a shift amount and a direction of a projected position of an object that is projected on each of pixel arrays that are obtained by the pupil division to perform the focus detection in such a configuration. Japanese Patent Laid-Open No. 2001-083407 discloses a configuration in which signals of photo diodes that correspond to the same micro lens are added to obtain a common video signal.
Japanese Patent Laid-Open No. 2009-163229 discloses a technology that is related to an interpolating method when a defect exists in pixels that are obtained by the pupil division. Japanese Patent Laid-Open No. 2009-163229 discloses a configuration in which a pixel obtained by the pupil division is discretely arranged between normal pixels to obtain a focus detection signal and a video signal. In a video signal processing, the pixel obtained by the pupil division is treated as a defective pixel and a defective pixel interpolation is performed by using information of a nearby normal pixel. On the other hand, with respect to the pixel obtained by the pupil division that is discretely arranged, the defective pixel interpolation is performed by using information of the pixel obtained by the nearby pupil division when the defect exists.
However, in the technology that is disclosed in Japanese Patent Laid-Open No. 2009-163229, a spatial distance to the nearby pixel obtained by the pupil division that is used for interpolating the defect of the pixel obtained by the pupil division is long. Therefore, when the sharpness of the image is high, an interpolation error is large. On the other hand, Japanese Patent Laid-Open No. 2001-083407 does not disclose a method of interpolating the defective pixel.